| 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 4162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4173 Utils::OpenHandle(this)->SetInternalField(index, *foreign); | 4173 Utils::OpenHandle(this)->SetInternalField(index, *foreign); |
| 4174 } | 4174 } |
| 4175 ASSERT_EQ(value, GetPointerFromInternalField(index)); | 4175 ASSERT_EQ(value, GetPointerFromInternalField(index)); |
| 4176 } | 4176 } |
| 4177 | 4177 |
| 4178 | 4178 |
| 4179 // --- E n v i r o n m e n t --- | 4179 // --- E n v i r o n m e n t --- |
| 4180 | 4180 |
| 4181 | 4181 |
| 4182 bool v8::V8::Initialize() { | 4182 bool v8::V8::Initialize() { |
| 4183 i::Isolate* isolate = i::Isolate::Current(); | 4183 i::Isolate* isolate = i::Isolate::UncheckedCurrent(); |
| 4184 if (isolate != NULL && isolate->IsInitialized()) { | 4184 if (isolate != NULL && isolate->IsInitialized()) { |
| 4185 return true; | 4185 return true; |
| 4186 } | 4186 } |
| 4187 return InitializeHelper(); | 4187 return InitializeHelper(); |
| 4188 } | 4188 } |
| 4189 | 4189 |
| 4190 | 4190 |
| 4191 void v8::V8::SetEntropySource(EntropySource source) { | 4191 void v8::V8::SetEntropySource(EntropySource source) { |
| 4192 i::V8::SetEntropySource(source); | 4192 i::V8::SetEntropySource(source); |
| 4193 } | 4193 } |
| (...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5066 // Introduce only canonical NaN value into the VM, to avoid signaling NaNs. | 5066 // Introduce only canonical NaN value into the VM, to avoid signaling NaNs. |
| 5067 value = i::OS::nan_value(); | 5067 value = i::OS::nan_value(); |
| 5068 } | 5068 } |
| 5069 ENTER_V8(isolate); | 5069 ENTER_V8(isolate); |
| 5070 i::Handle<i::Object> result = isolate->factory()->NewNumber(value); | 5070 i::Handle<i::Object> result = isolate->factory()->NewNumber(value); |
| 5071 return Utils::NumberToLocal(result); | 5071 return Utils::NumberToLocal(result); |
| 5072 } | 5072 } |
| 5073 | 5073 |
| 5074 | 5074 |
| 5075 Local<Integer> v8::Integer::New(int32_t value) { | 5075 Local<Integer> v8::Integer::New(int32_t value) { |
| 5076 i::Isolate* isolate = i::Isolate::Current(); | 5076 i::Isolate* isolate = i::Isolate::UncheckedCurrent(); |
| 5077 EnsureInitializedForIsolate(isolate, "v8::Integer::New()"); | 5077 EnsureInitializedForIsolate(isolate, "v8::Integer::New()"); |
| 5078 if (i::Smi::IsValid(value)) { | 5078 if (i::Smi::IsValid(value)) { |
| 5079 return Utils::IntegerToLocal(i::Handle<i::Object>(i::Smi::FromInt(value), | 5079 return Utils::IntegerToLocal(i::Handle<i::Object>(i::Smi::FromInt(value), |
| 5080 isolate)); | 5080 isolate)); |
| 5081 } | 5081 } |
| 5082 ENTER_V8(isolate); | 5082 ENTER_V8(isolate); |
| 5083 i::Handle<i::Object> result = isolate->factory()->NewNumber(value); | 5083 i::Handle<i::Object> result = isolate->factory()->NewNumber(value); |
| 5084 return Utils::IntegerToLocal(result); | 5084 return Utils::IntegerToLocal(result); |
| 5085 } | 5085 } |
| 5086 | 5086 |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5344 | 5344 |
| 5345 | 5345 |
| 5346 bool V8::IsExecutionTerminating(Isolate* isolate) { | 5346 bool V8::IsExecutionTerminating(Isolate* isolate) { |
| 5347 i::Isolate* i_isolate = isolate != NULL ? | 5347 i::Isolate* i_isolate = isolate != NULL ? |
| 5348 reinterpret_cast<i::Isolate*>(isolate) : i::Isolate::Current(); | 5348 reinterpret_cast<i::Isolate*>(isolate) : i::Isolate::Current(); |
| 5349 return IsExecutionTerminatingCheck(i_isolate); | 5349 return IsExecutionTerminatingCheck(i_isolate); |
| 5350 } | 5350 } |
| 5351 | 5351 |
| 5352 | 5352 |
| 5353 Isolate* Isolate::GetCurrent() { | 5353 Isolate* Isolate::GetCurrent() { |
| 5354 i::Isolate* isolate = i::Isolate::Current(); | 5354 i::Isolate* isolate = i::Isolate::UncheckedCurrent(); |
| 5355 return reinterpret_cast<Isolate*>(isolate); | 5355 return reinterpret_cast<Isolate*>(isolate); |
| 5356 } | 5356 } |
| 5357 | 5357 |
| 5358 | 5358 |
| 5359 Isolate* Isolate::New() { | 5359 Isolate* Isolate::New() { |
| 5360 i::Isolate* isolate = new i::Isolate(); | 5360 i::Isolate* isolate = new i::Isolate(); |
| 5361 return reinterpret_cast<Isolate*>(isolate); | 5361 return reinterpret_cast<Isolate*>(isolate); |
| 5362 } | 5362 } |
| 5363 | 5363 |
| 5364 | 5364 |
| (...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6376 | 6376 |
| 6377 | 6377 |
| 6378 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 6378 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
| 6379 HandleScopeImplementer* scope_implementer = | 6379 HandleScopeImplementer* scope_implementer = |
| 6380 reinterpret_cast<HandleScopeImplementer*>(storage); | 6380 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 6381 scope_implementer->IterateThis(v); | 6381 scope_implementer->IterateThis(v); |
| 6382 return storage + ArchiveSpacePerThread(); | 6382 return storage + ArchiveSpacePerThread(); |
| 6383 } | 6383 } |
| 6384 | 6384 |
| 6385 } } // namespace v8::internal | 6385 } } // namespace v8::internal |
| OLD | NEW |