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

Side by Side Diff: src/runtime.cc

Issue 160073006: Implement handling of arrow functions in the parser (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased after latest changes in runtime.{h,cc} Created 6 years, 8 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2922 matching lines...) Expand 10 before | Expand all | Expand 10 after
2933 2933
2934 2934
2935 RUNTIME_FUNCTION(Runtime_FunctionIsGenerator) { 2935 RUNTIME_FUNCTION(Runtime_FunctionIsGenerator) {
2936 SealHandleScope shs(isolate); 2936 SealHandleScope shs(isolate);
2937 ASSERT(args.length() == 1); 2937 ASSERT(args.length() == 1);
2938 CONVERT_ARG_CHECKED(JSFunction, f, 0); 2938 CONVERT_ARG_CHECKED(JSFunction, f, 0);
2939 return isolate->heap()->ToBoolean(f->shared()->is_generator()); 2939 return isolate->heap()->ToBoolean(f->shared()->is_generator());
2940 } 2940 }
2941 2941
2942 2942
2943 RUNTIME_FUNCTION(Runtime_FunctionIsArrow) {
2944 SealHandleScope shs(isolate);
2945 ASSERT(args.length() == 1);
2946 CONVERT_ARG_CHECKED(JSFunction, f, 0);
2947 return isolate->heap()->ToBoolean(f->shared()->is_arrow());
2948 }
2949
2950
2943 RUNTIME_FUNCTION(Runtime_FunctionRemovePrototype) { 2951 RUNTIME_FUNCTION(Runtime_FunctionRemovePrototype) {
2944 SealHandleScope shs(isolate); 2952 SealHandleScope shs(isolate);
2945 ASSERT(args.length() == 1); 2953 ASSERT(args.length() == 1);
2946 2954
2947 CONVERT_ARG_CHECKED(JSFunction, f, 0); 2955 CONVERT_ARG_CHECKED(JSFunction, f, 0);
2948 f->RemovePrototype(); 2956 f->RemovePrototype();
2949 2957
2950 return isolate->heap()->undefined_value(); 2958 return isolate->heap()->undefined_value();
2951 } 2959 }
2952 2960
(...skipping 12164 matching lines...) Expand 10 before | Expand all | Expand 10 after
15117 } 15125 }
15118 return NULL; 15126 return NULL;
15119 } 15127 }
15120 15128
15121 15129
15122 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 15130 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
15123 return &(kIntrinsicFunctions[static_cast<int>(id)]); 15131 return &(kIntrinsicFunctions[static_cast<int>(id)]);
15124 } 15132 }
15125 15133
15126 } } // namespace v8::internal 15134 } } // namespace v8::internal
OLDNEW
« src/preparser.h ('K') | « src/runtime.h ('k') | src/scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698