| 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 3996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4007 Utils::OpenHandle(this)->SetInternalField(index, *foreign); | 4007 Utils::OpenHandle(this)->SetInternalField(index, *foreign); |
| 4008 } | 4008 } |
| 4009 ASSERT_EQ(value, GetPointerFromInternalField(index)); | 4009 ASSERT_EQ(value, GetPointerFromInternalField(index)); |
| 4010 } | 4010 } |
| 4011 | 4011 |
| 4012 | 4012 |
| 4013 // --- E n v i r o n m e n t --- | 4013 // --- E n v i r o n m e n t --- |
| 4014 | 4014 |
| 4015 | 4015 |
| 4016 bool v8::V8::Initialize() { | 4016 bool v8::V8::Initialize() { |
| 4017 i::Isolate* isolate = i::Isolate::UncheckedCurrent(); | 4017 i::Isolate* isolate = i::Isolate::Current(); |
| 4018 if (isolate != NULL && isolate->IsInitialized()) { | 4018 if (isolate != NULL && isolate->IsInitialized()) { |
| 4019 return true; | 4019 return true; |
| 4020 } | 4020 } |
| 4021 return InitializeHelper(); | 4021 return InitializeHelper(); |
| 4022 } | 4022 } |
| 4023 | 4023 |
| 4024 | 4024 |
| 4025 void v8::V8::SetEntropySource(EntropySource source) { | 4025 void v8::V8::SetEntropySource(EntropySource source) { |
| 4026 i::V8::SetEntropySource(source); | 4026 i::V8::SetEntropySource(source); |
| 4027 } | 4027 } |
| (...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4900 // Introduce only canonical NaN value into the VM, to avoid signaling NaNs. | 4900 // Introduce only canonical NaN value into the VM, to avoid signaling NaNs. |
| 4901 value = i::OS::nan_value(); | 4901 value = i::OS::nan_value(); |
| 4902 } | 4902 } |
| 4903 ENTER_V8(isolate); | 4903 ENTER_V8(isolate); |
| 4904 i::Handle<i::Object> result = isolate->factory()->NewNumber(value); | 4904 i::Handle<i::Object> result = isolate->factory()->NewNumber(value); |
| 4905 return Utils::NumberToLocal(result); | 4905 return Utils::NumberToLocal(result); |
| 4906 } | 4906 } |
| 4907 | 4907 |
| 4908 | 4908 |
| 4909 Local<Integer> v8::Integer::New(int32_t value) { | 4909 Local<Integer> v8::Integer::New(int32_t value) { |
| 4910 i::Isolate* isolate = i::Isolate::UncheckedCurrent(); | 4910 i::Isolate* isolate = i::Isolate::Current(); |
| 4911 EnsureInitializedForIsolate(isolate, "v8::Integer::New()"); | 4911 EnsureInitializedForIsolate(isolate, "v8::Integer::New()"); |
| 4912 if (i::Smi::IsValid(value)) { | 4912 if (i::Smi::IsValid(value)) { |
| 4913 return Utils::IntegerToLocal(i::Handle<i::Object>(i::Smi::FromInt(value), | 4913 return Utils::IntegerToLocal(i::Handle<i::Object>(i::Smi::FromInt(value), |
| 4914 isolate)); | 4914 isolate)); |
| 4915 } | 4915 } |
| 4916 ENTER_V8(isolate); | 4916 ENTER_V8(isolate); |
| 4917 i::Handle<i::Object> result = isolate->factory()->NewNumber(value); | 4917 i::Handle<i::Object> result = isolate->factory()->NewNumber(value); |
| 4918 return Utils::IntegerToLocal(result); | 4918 return Utils::IntegerToLocal(result); |
| 4919 } | 4919 } |
| 4920 | 4920 |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5178 | 5178 |
| 5179 | 5179 |
| 5180 bool V8::IsExecutionTerminating(Isolate* isolate) { | 5180 bool V8::IsExecutionTerminating(Isolate* isolate) { |
| 5181 i::Isolate* i_isolate = isolate != NULL ? | 5181 i::Isolate* i_isolate = isolate != NULL ? |
| 5182 reinterpret_cast<i::Isolate*>(isolate) : i::Isolate::Current(); | 5182 reinterpret_cast<i::Isolate*>(isolate) : i::Isolate::Current(); |
| 5183 return IsExecutionTerminatingCheck(i_isolate); | 5183 return IsExecutionTerminatingCheck(i_isolate); |
| 5184 } | 5184 } |
| 5185 | 5185 |
| 5186 | 5186 |
| 5187 Isolate* Isolate::GetCurrent() { | 5187 Isolate* Isolate::GetCurrent() { |
| 5188 i::Isolate* isolate = i::Isolate::UncheckedCurrent(); | 5188 i::Isolate* isolate = i::Isolate::Current(); |
| 5189 return reinterpret_cast<Isolate*>(isolate); | 5189 return reinterpret_cast<Isolate*>(isolate); |
| 5190 } | 5190 } |
| 5191 | 5191 |
| 5192 | 5192 |
| 5193 Isolate* Isolate::New() { | 5193 Isolate* Isolate::New() { |
| 5194 i::Isolate* isolate = new i::Isolate(); | 5194 i::Isolate* isolate = new i::Isolate(); |
| 5195 return reinterpret_cast<Isolate*>(isolate); | 5195 return reinterpret_cast<Isolate*>(isolate); |
| 5196 } | 5196 } |
| 5197 | 5197 |
| 5198 | 5198 |
| (...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6202 | 6202 |
| 6203 | 6203 |
| 6204 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 6204 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
| 6205 HandleScopeImplementer* scope_implementer = | 6205 HandleScopeImplementer* scope_implementer = |
| 6206 reinterpret_cast<HandleScopeImplementer*>(storage); | 6206 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 6207 scope_implementer->IterateThis(v); | 6207 scope_implementer->IterateThis(v); |
| 6208 return storage + ArchiveSpacePerThread(); | 6208 return storage + ArchiveSpacePerThread(); |
| 6209 } | 6209 } |
| 6210 | 6210 |
| 6211 } } // namespace v8::internal | 6211 } } // namespace v8::internal |
| OLD | NEW |