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

Side by Side Diff: src/runtime.cc

Issue 420073004: Implement lowering of JSStoreContext to machine operators. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/runtime.h ('k') | tools/generate-runtime-tests.py » ('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 <stdlib.h> 5 #include <stdlib.h>
6 #include <limits> 6 #include <limits>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 9390 matching lines...) Expand 10 before | Expand all | Expand 10 after
9401 object = Handle<JSReceiver>(context->global_object()); 9401 object = Handle<JSReceiver>(context->global_object());
9402 } 9402 }
9403 9403
9404 RETURN_FAILURE_ON_EXCEPTION( 9404 RETURN_FAILURE_ON_EXCEPTION(
9405 isolate, Object::SetProperty(object, name, value, strict_mode)); 9405 isolate, Object::SetProperty(object, name, value, strict_mode));
9406 9406
9407 return *value; 9407 return *value;
9408 } 9408 }
9409 9409
9410 9410
9411 RUNTIME_FUNCTION(Runtime_StoreContextRelative) {
9412 SealHandleScope shs(isolate);
9413 ASSERT(args.length() == 4);
9414 CONVERT_ARG_CHECKED(Context, context, 0);
9415 CONVERT_SMI_ARG_CHECKED(depth, 1);
9416 CONVERT_SMI_ARG_CHECKED(index, 2);
9417 CONVERT_ARG_CHECKED(Object, value, 3);
9418 while (depth-- > 0) {
9419 context = context->previous();
9420 ASSERT(context->IsContext());
9421 }
9422 context->set(index, value);
9423 return isolate->heap()->undefined_value();
9424 }
9425
9426
9427 RUNTIME_FUNCTION(Runtime_Throw) { 9411 RUNTIME_FUNCTION(Runtime_Throw) {
9428 HandleScope scope(isolate); 9412 HandleScope scope(isolate);
9429 ASSERT(args.length() == 1); 9413 ASSERT(args.length() == 1);
9430 9414
9431 return isolate->Throw(args[0]); 9415 return isolate->Throw(args[0]);
9432 } 9416 }
9433 9417
9434 9418
9435 RUNTIME_FUNCTION(Runtime_ReThrow) { 9419 RUNTIME_FUNCTION(Runtime_ReThrow) {
9436 HandleScope scope(isolate); 9420 HandleScope scope(isolate);
(...skipping 6161 matching lines...) Expand 10 before | Expand all | Expand 10 after
15598 } 15582 }
15599 return NULL; 15583 return NULL;
15600 } 15584 }
15601 15585
15602 15586
15603 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 15587 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
15604 return &(kIntrinsicFunctions[static_cast<int>(id)]); 15588 return &(kIntrinsicFunctions[static_cast<int>(id)]);
15605 } 15589 }
15606 15590
15607 } } // namespace v8::internal 15591 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.h ('k') | tools/generate-runtime-tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698