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

Side by Side Diff: src/execution.cc

Issue 1567963002: [builtins] Migrate Object.keys to C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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 | « src/execution.h ('k') | src/js/json.js » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/execution.h" 5 #include "src/execution.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/isolate-inl.h" 9 #include "src/isolate-inl.h"
10 #include "src/messages.h" 10 #include "src/messages.h"
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 // You should hold the ExecutionAccess lock when you call this. 414 // You should hold the ExecutionAccess lock when you call this.
415 if (stored_limit != 0) { 415 if (stored_limit != 0) {
416 SetStackLimit(stored_limit); 416 SetStackLimit(stored_limit);
417 } 417 }
418 } 418 }
419 419
420 420
421 // --- C a l l s t o n a t i v e s --- 421 // --- C a l l s t o n a t i v e s ---
422 422
423 423
424 MaybeHandle<Object> Execution::ToObject(Isolate* isolate, Handle<Object> obj) { 424 MaybeHandle<JSReceiver> Execution::ToObject(Isolate* isolate,
425 Handle<Object> obj) {
425 Handle<JSReceiver> receiver; 426 Handle<JSReceiver> receiver;
426 if (JSReceiver::ToObject(isolate, obj).ToHandle(&receiver)) { 427 if (JSReceiver::ToObject(isolate, obj).ToHandle(&receiver)) {
427 return receiver; 428 return receiver;
428 } 429 }
429 THROW_NEW_ERROR( 430 THROW_NEW_ERROR(isolate,
430 isolate, NewTypeError(MessageTemplate::kUndefinedOrNullToObject), Object); 431 NewTypeError(MessageTemplate::kUndefinedOrNullToObject),
432 JSReceiver);
431 } 433 }
432 434
433 435
434 Handle<String> Execution::GetStackTraceLine(Handle<Object> recv, 436 Handle<String> Execution::GetStackTraceLine(Handle<Object> recv,
435 Handle<JSFunction> fun, 437 Handle<JSFunction> fun,
436 Handle<Object> pos, 438 Handle<Object> pos,
437 Handle<Object> is_global) { 439 Handle<Object> is_global) {
438 Isolate* isolate = fun->GetIsolate(); 440 Isolate* isolate = fun->GetIsolate();
439 Handle<Object> args[] = { recv, fun, pos, is_global }; 441 Handle<Object> args[] = { recv, fun, pos, is_global };
440 MaybeHandle<Object> maybe_result = 442 MaybeHandle<Object> maybe_result =
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 492
491 isolate_->counters()->stack_interrupts()->Increment(); 493 isolate_->counters()->stack_interrupts()->Increment();
492 isolate_->counters()->runtime_profiler_ticks()->Increment(); 494 isolate_->counters()->runtime_profiler_ticks()->Increment();
493 isolate_->runtime_profiler()->OptimizeNow(); 495 isolate_->runtime_profiler()->OptimizeNow();
494 496
495 return isolate_->heap()->undefined_value(); 497 return isolate_->heap()->undefined_value();
496 } 498 }
497 499
498 } // namespace internal 500 } // namespace internal
499 } // namespace v8 501 } // namespace v8
OLDNEW
« no previous file with comments | « src/execution.h ('k') | src/js/json.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698