Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Side by Side Diff: src/api.cc

Issue 1316943002: Move (uppercase) JS builtins from js builtins object to native context. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove Isolate::js_builtins_object Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/arm/builtins-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 3355 matching lines...) Expand 10 before | Expand all | Expand 10 after
3366 auto self = Utils::OpenHandle(this); 3366 auto self = Utils::OpenHandle(this);
3367 auto other = Utils::OpenHandle(*that); 3367 auto other = Utils::OpenHandle(*that);
3368 if (self->IsSmi() && other->IsSmi()) { 3368 if (self->IsSmi() && other->IsSmi()) {
3369 return Just(self->Number() == other->Number()); 3369 return Just(self->Number() == other->Number());
3370 } 3370 }
3371 if (self->IsJSObject() && other->IsJSObject()) { 3371 if (self->IsJSObject() && other->IsJSObject()) {
3372 return Just(*self == *other); 3372 return Just(*self == *other);
3373 } 3373 }
3374 PREPARE_FOR_EXECUTION_PRIMITIVE(context, "v8::Value::Equals()", bool); 3374 PREPARE_FOR_EXECUTION_PRIMITIVE(context, "v8::Value::Equals()", bool);
3375 i::Handle<i::Object> args[] = { other }; 3375 i::Handle<i::Object> args[] = { other };
3376 i::Handle<i::JSFunction> fun(i::JSFunction::cast( 3376 i::Handle<i::JSFunction> fun = isolate->equals_builtin();
3377 isolate->js_builtins_object()->javascript_builtin(i::Builtins::EQUALS)));
3378 i::Handle<i::Object> result; 3377 i::Handle<i::Object> result;
3379 has_pending_exception = 3378 has_pending_exception =
3380 !i::Execution::Call(isolate, fun, self, arraysize(args), args) 3379 !i::Execution::Call(isolate, fun, self, arraysize(args), args)
3381 .ToHandle(&result); 3380 .ToHandle(&result);
3382 RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool); 3381 RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool);
3383 return Just(*result == i::Smi::FromInt(i::EQUAL)); 3382 return Just(*result == i::Smi::FromInt(i::EQUAL));
3384 } 3383 }
3385 3384
3386 3385
3387 bool Value::Equals(Local<Value> that) const { 3386 bool Value::Equals(Local<Value> that) const {
(...skipping 5021 matching lines...) Expand 10 before | Expand all | Expand 10 after
8409 Address callback_address = 8408 Address callback_address =
8410 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8409 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8411 VMState<EXTERNAL> state(isolate); 8410 VMState<EXTERNAL> state(isolate);
8412 ExternalCallbackScope call_scope(isolate, callback_address); 8411 ExternalCallbackScope call_scope(isolate, callback_address);
8413 callback(info); 8412 callback(info);
8414 } 8413 }
8415 8414
8416 8415
8417 } // namespace internal 8416 } // namespace internal
8418 } // namespace v8 8417 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/arm/builtins-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698