~ubuntu-branches/ubuntu/trusty/libv8/trusty

« back to all changes in this revision

Viewing changes to src/v8.cc

  • Committer: Package Import Robot
  • Author(s): Jérémy Lal
  • Date: 2012-02-20 14:08:17 UTC
  • mfrom: (15.1.24 sid)
  • Revision ID: package-import@ubuntu.com-20120220140817-bsvmeoa4sxsj5hbz
Tags: 3.7.12.22-3
Fix mipsel build, allow test debug-step-3 to fail (non-crucial)

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
#include "log.h"
39
39
#include "runtime-profiler.h"
40
40
#include "serialize.h"
 
41
#include "store-buffer.h"
41
42
 
42
43
namespace v8 {
43
44
namespace internal {
56
57
 
57
58
 
58
59
bool V8::Initialize(Deserializer* des) {
 
60
  // Setting --harmony implies all other harmony flags.
 
61
  // TODO(rossberg): Is there a better place to put this?
 
62
  if (FLAG_harmony) {
 
63
    FLAG_harmony_typeof = true;
 
64
    FLAG_harmony_scoping = true;
 
65
    FLAG_harmony_proxies = true;
 
66
    FLAG_harmony_collections = true;
 
67
  }
 
68
 
59
69
  InitializeOncePerProcess();
60
70
 
61
71
  // The current thread may not yet had entered an isolate to run.
140
150
 
141
151
 
142
152
// Used by JavaScript APIs
143
 
uint32_t V8::Random(Isolate* isolate) {
144
 
  ASSERT(isolate == Isolate::Current());
145
 
  return random_base(isolate->random_seed());
 
153
uint32_t V8::Random(Context* context) {
 
154
  ASSERT(context->IsGlobalContext());
 
155
  ByteArray* seed = context->random_seed();
 
156
  return random_base(reinterpret_cast<uint32_t*>(seed->GetDataStartAddress()));
146
157
}
147
158
 
148
159
 
172
183
} double_int_union;
173
184
 
174
185
 
175
 
Object* V8::FillHeapNumberWithRandom(Object* heap_number, Isolate* isolate) {
176
 
  uint64_t random_bits = Random(isolate);
 
186
Object* V8::FillHeapNumberWithRandom(Object* heap_number,
 
187
                                     Context* context) {
 
188
  uint64_t random_bits = Random(context);
177
189
  // Make a double* from address (heap_number + sizeof(double)).
178
190
  double_int_union* r = reinterpret_cast<double_int_union*>(
179
191
      reinterpret_cast<char*>(heap_number) +
215
227
  FLAG_peephole_optimization = !use_crankshaft_;
216
228
 
217
229
  ElementsAccessor::InitializeOncePerProcess();
 
230
 
 
231
  if (FLAG_stress_compaction) {
 
232
    FLAG_force_marking_deque_overflows = true;
 
233
    FLAG_gc_global = true;
 
234
    FLAG_max_new_space_size = (1 << (kPageSizeBits - 10)) * 2;
 
235
  }
218
236
}
219
237
 
220
238
} }  // namespace v8::internal