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

Side by Side Diff: src/runtime.cc

Issue 382893003: Implement basic code generation for arrow functions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Test failures fixed, some minor corrections Created 6 years, 5 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 2654 matching lines...) Expand 10 before | Expand all | Expand 10 after
2665 2665
2666 2666
2667 RUNTIME_FUNCTION(Runtime_FunctionIsGenerator) { 2667 RUNTIME_FUNCTION(Runtime_FunctionIsGenerator) {
2668 SealHandleScope shs(isolate); 2668 SealHandleScope shs(isolate);
2669 ASSERT(args.length() == 1); 2669 ASSERT(args.length() == 1);
2670 CONVERT_ARG_CHECKED(JSFunction, f, 0); 2670 CONVERT_ARG_CHECKED(JSFunction, f, 0);
2671 return isolate->heap()->ToBoolean(f->shared()->is_generator()); 2671 return isolate->heap()->ToBoolean(f->shared()->is_generator());
2672 } 2672 }
2673 2673
2674 2674
2675 RUNTIME_FUNCTION(Runtime_FunctionIsArrow) {
2676 SealHandleScope shs(isolate);
2677 ASSERT(args.length() == 1);
2678 CONVERT_ARG_CHECKED(JSFunction, f, 0);
2679 return isolate->heap()->ToBoolean(f->shared()->is_arrow());
2680 }
2681
2682
2675 RUNTIME_FUNCTION(Runtime_FunctionRemovePrototype) { 2683 RUNTIME_FUNCTION(Runtime_FunctionRemovePrototype) {
2676 SealHandleScope shs(isolate); 2684 SealHandleScope shs(isolate);
2677 ASSERT(args.length() == 1); 2685 ASSERT(args.length() == 1);
2678 2686
2679 CONVERT_ARG_CHECKED(JSFunction, f, 0); 2687 CONVERT_ARG_CHECKED(JSFunction, f, 0);
2680 RUNTIME_ASSERT(f->RemovePrototype()); 2688 RUNTIME_ASSERT(f->RemovePrototype());
2681 2689
2682 return isolate->heap()->undefined_value(); 2690 return isolate->heap()->undefined_value();
2683 } 2691 }
2684 2692
(...skipping 12258 matching lines...) Expand 10 before | Expand all | Expand 10 after
14943 } 14951 }
14944 return NULL; 14952 return NULL;
14945 } 14953 }
14946 14954
14947 14955
14948 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 14956 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
14949 return &(kIntrinsicFunctions[static_cast<int>(id)]); 14957 return &(kIntrinsicFunctions[static_cast<int>(id)]);
14950 } 14958 }
14951 14959
14952 } } // namespace v8::internal 14960 } } // 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