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

Side by Side Diff: src/runtime.cc

Issue 477263002: ES6: Add support for method shorthand in object literals (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: merge Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/runtime.h ('k') | src/v8natives.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 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 2757 matching lines...) Expand 10 before | Expand all | Expand 10 after
2768 2768
2769 2769
2770 RUNTIME_FUNCTION(Runtime_FunctionIsArrow) { 2770 RUNTIME_FUNCTION(Runtime_FunctionIsArrow) {
2771 SealHandleScope shs(isolate); 2771 SealHandleScope shs(isolate);
2772 DCHECK(args.length() == 1); 2772 DCHECK(args.length() == 1);
2773 CONVERT_ARG_CHECKED(JSFunction, f, 0); 2773 CONVERT_ARG_CHECKED(JSFunction, f, 0);
2774 return isolate->heap()->ToBoolean(f->shared()->is_arrow()); 2774 return isolate->heap()->ToBoolean(f->shared()->is_arrow());
2775 } 2775 }
2776 2776
2777 2777
2778 RUNTIME_FUNCTION(Runtime_FunctionIsConciseMethod) {
2779 SealHandleScope shs(isolate);
2780 DCHECK(args.length() == 1);
2781 CONVERT_ARG_CHECKED(JSFunction, f, 0);
2782 return isolate->heap()->ToBoolean(f->shared()->is_concise_method());
2783 }
2784
2785
2778 RUNTIME_FUNCTION(Runtime_FunctionRemovePrototype) { 2786 RUNTIME_FUNCTION(Runtime_FunctionRemovePrototype) {
2779 SealHandleScope shs(isolate); 2787 SealHandleScope shs(isolate);
2780 DCHECK(args.length() == 1); 2788 DCHECK(args.length() == 1);
2781 2789
2782 CONVERT_ARG_CHECKED(JSFunction, f, 0); 2790 CONVERT_ARG_CHECKED(JSFunction, f, 0);
2783 RUNTIME_ASSERT(f->RemovePrototype()); 2791 RUNTIME_ASSERT(f->RemovePrototype());
2784 2792
2785 return isolate->heap()->undefined_value(); 2793 return isolate->heap()->undefined_value();
2786 } 2794 }
2787 2795
(...skipping 5330 matching lines...) Expand 10 before | Expand all | Expand 10 after
8118 return *NewStrictArguments(isolate, callee, parameters, argument_count); 8126 return *NewStrictArguments(isolate, callee, parameters, argument_count);
8119 } 8127 }
8120 8128
8121 8129
8122 RUNTIME_FUNCTION(Runtime_NewClosureFromStubFailure) { 8130 RUNTIME_FUNCTION(Runtime_NewClosureFromStubFailure) {
8123 HandleScope scope(isolate); 8131 HandleScope scope(isolate);
8124 DCHECK(args.length() == 1); 8132 DCHECK(args.length() == 1);
8125 CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 0); 8133 CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 0);
8126 Handle<Context> context(isolate->context()); 8134 Handle<Context> context(isolate->context());
8127 PretenureFlag pretenure_flag = NOT_TENURED; 8135 PretenureFlag pretenure_flag = NOT_TENURED;
8128 return *isolate->factory()->NewFunctionFromSharedFunctionInfo( 8136 return *isolate->factory()->NewFunctionFromSharedFunctionInfo(shared, context,
8129 shared, context, pretenure_flag); 8137 pretenure_flag);
8130 } 8138 }
8131 8139
8132 8140
8133 RUNTIME_FUNCTION(Runtime_NewClosure) { 8141 RUNTIME_FUNCTION(Runtime_NewClosure) {
8134 HandleScope scope(isolate); 8142 HandleScope scope(isolate);
8135 DCHECK(args.length() == 3); 8143 DCHECK(args.length() == 3);
8136 CONVERT_ARG_HANDLE_CHECKED(Context, context, 0); 8144 CONVERT_ARG_HANDLE_CHECKED(Context, context, 0);
8137 CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 1); 8145 CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 1);
8138 CONVERT_BOOLEAN_ARG_CHECKED(pretenure, 2); 8146 CONVERT_BOOLEAN_ARG_CHECKED(pretenure, 2);
8139 8147
(...skipping 7516 matching lines...) Expand 10 before | Expand all | Expand 10 after
15656 } 15664 }
15657 return NULL; 15665 return NULL;
15658 } 15666 }
15659 15667
15660 15668
15661 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 15669 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
15662 return &(kIntrinsicFunctions[static_cast<int>(id)]); 15670 return &(kIntrinsicFunctions[static_cast<int>(id)]);
15663 } 15671 }
15664 15672
15665 } } // namespace v8::internal 15673 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.h ('k') | src/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698