| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 4152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4163 Utils::OpenHandle(this)->SetInternalField(index, *foreign); | 4163 Utils::OpenHandle(this)->SetInternalField(index, *foreign); |
| 4164 } | 4164 } |
| 4165 ASSERT_EQ(value, GetPointerFromInternalField(index)); | 4165 ASSERT_EQ(value, GetPointerFromInternalField(index)); |
| 4166 } | 4166 } |
| 4167 | 4167 |
| 4168 | 4168 |
| 4169 // --- E n v i r o n m e n t --- | 4169 // --- E n v i r o n m e n t --- |
| 4170 | 4170 |
| 4171 | 4171 |
| 4172 bool v8::V8::Initialize() { | 4172 bool v8::V8::Initialize() { |
| 4173 i::Isolate* isolate = i::Isolate::Current(); | 4173 i::Isolate* isolate = i::Isolate::UncheckedCurrent(); |
| 4174 if (isolate != NULL && isolate->IsInitialized()) { | 4174 if (isolate != NULL && isolate->IsInitialized()) { |
| 4175 return true; | 4175 return true; |
| 4176 } | 4176 } |
| 4177 return InitializeHelper(); | 4177 return InitializeHelper(); |
| 4178 } | 4178 } |
| 4179 | 4179 |
| 4180 | 4180 |
| 4181 void v8::V8::SetEntropySource(EntropySource source) { | 4181 void v8::V8::SetEntropySource(EntropySource source) { |
| 4182 i::V8::SetEntropySource(source); | 4182 i::V8::SetEntropySource(source); |
| 4183 } | 4183 } |
| (...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5056 // Introduce only canonical NaN value into the VM, to avoid signaling NaNs. | 5056 // Introduce only canonical NaN value into the VM, to avoid signaling NaNs. |
| 5057 value = i::OS::nan_value(); | 5057 value = i::OS::nan_value(); |
| 5058 } | 5058 } |
| 5059 ENTER_V8(isolate); | 5059 ENTER_V8(isolate); |
| 5060 i::Handle<i::Object> result = isolate->factory()->NewNumber(value); | 5060 i::Handle<i::Object> result = isolate->factory()->NewNumber(value); |
| 5061 return Utils::NumberToLocal(result); | 5061 return Utils::NumberToLocal(result); |
| 5062 } | 5062 } |
| 5063 | 5063 |
| 5064 | 5064 |
| 5065 Local<Integer> v8::Integer::New(int32_t value) { | 5065 Local<Integer> v8::Integer::New(int32_t value) { |
| 5066 i::Isolate* isolate = i::Isolate::Current(); | 5066 i::Isolate* isolate = i::Isolate::UncheckedCurrent(); |
| 5067 EnsureInitializedForIsolate(isolate, "v8::Integer::New()"); | 5067 EnsureInitializedForIsolate(isolate, "v8::Integer::New()"); |
| 5068 if (i::Smi::IsValid(value)) { | 5068 if (i::Smi::IsValid(value)) { |
| 5069 return Utils::IntegerToLocal(i::Handle<i::Object>(i::Smi::FromInt(value), | 5069 return Utils::IntegerToLocal(i::Handle<i::Object>(i::Smi::FromInt(value), |
| 5070 isolate)); | 5070 isolate)); |
| 5071 } | 5071 } |
| 5072 ENTER_V8(isolate); | 5072 ENTER_V8(isolate); |
| 5073 i::Handle<i::Object> result = isolate->factory()->NewNumber(value); | 5073 i::Handle<i::Object> result = isolate->factory()->NewNumber(value); |
| 5074 return Utils::IntegerToLocal(result); | 5074 return Utils::IntegerToLocal(result); |
| 5075 } | 5075 } |
| 5076 | 5076 |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5334 | 5334 |
| 5335 | 5335 |
| 5336 bool V8::IsExecutionTerminating(Isolate* isolate) { | 5336 bool V8::IsExecutionTerminating(Isolate* isolate) { |
| 5337 i::Isolate* i_isolate = isolate != NULL ? | 5337 i::Isolate* i_isolate = isolate != NULL ? |
| 5338 reinterpret_cast<i::Isolate*>(isolate) : i::Isolate::Current(); | 5338 reinterpret_cast<i::Isolate*>(isolate) : i::Isolate::Current(); |
| 5339 return IsExecutionTerminatingCheck(i_isolate); | 5339 return IsExecutionTerminatingCheck(i_isolate); |
| 5340 } | 5340 } |
| 5341 | 5341 |
| 5342 | 5342 |
| 5343 Isolate* Isolate::GetCurrent() { | 5343 Isolate* Isolate::GetCurrent() { |
| 5344 i::Isolate* isolate = i::Isolate::Current(); | 5344 i::Isolate* isolate = i::Isolate::UncheckedCurrent(); |
| 5345 return reinterpret_cast<Isolate*>(isolate); | 5345 return reinterpret_cast<Isolate*>(isolate); |
| 5346 } | 5346 } |
| 5347 | 5347 |
| 5348 | 5348 |
| 5349 Isolate* Isolate::New() { | 5349 Isolate* Isolate::New() { |
| 5350 i::Isolate* isolate = new i::Isolate(); | 5350 i::Isolate* isolate = new i::Isolate(); |
| 5351 return reinterpret_cast<Isolate*>(isolate); | 5351 return reinterpret_cast<Isolate*>(isolate); |
| 5352 } | 5352 } |
| 5353 | 5353 |
| 5354 | 5354 |
| (...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6366 | 6366 |
| 6367 | 6367 |
| 6368 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 6368 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
| 6369 HandleScopeImplementer* scope_implementer = | 6369 HandleScopeImplementer* scope_implementer = |
| 6370 reinterpret_cast<HandleScopeImplementer*>(storage); | 6370 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 6371 scope_implementer->IterateThis(v); | 6371 scope_implementer->IterateThis(v); |
| 6372 return storage + ArchiveSpacePerThread(); | 6372 return storage + ArchiveSpacePerThread(); |
| 6373 } | 6373 } |
| 6374 | 6374 |
| 6375 } } // namespace v8::internal | 6375 } } // namespace v8::internal |
| OLD | NEW |