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

Side by Side Diff: src/builtins.cc

Issue 270133003: Poison .arguments and .caller for generator functions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address nits, add tests Created 6 years, 7 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/builtins.h ('k') | src/messages.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 "v8.h" 5 #include "v8.h"
6 6
7 #include "api.h" 7 #include "api.h"
8 #include "arguments.h" 8 #include "arguments.h"
9 #include "bootstrapper.h" 9 #include "bootstrapper.h"
10 #include "builtins.h" 10 #include "builtins.h"
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 } 1061 }
1062 } 1062 }
1063 1063
1064 ASSERT(j == result_len); 1064 ASSERT(j == result_len);
1065 1065
1066 return *result_array; 1066 return *result_array;
1067 } 1067 }
1068 1068
1069 1069
1070 // ----------------------------------------------------------------------------- 1070 // -----------------------------------------------------------------------------
1071 // Strict mode poison pills 1071 // Generator and strict mode poison pills
1072 1072
1073 1073
1074 BUILTIN(StrictModePoisonPill) { 1074 BUILTIN(StrictModePoisonPill) {
1075 HandleScope scope(isolate); 1075 HandleScope scope(isolate);
1076 return isolate->Throw(*isolate->factory()->NewTypeError( 1076 return isolate->Throw(*isolate->factory()->NewTypeError(
1077 "strict_poison_pill", HandleVector<Object>(NULL, 0))); 1077 "strict_poison_pill", HandleVector<Object>(NULL, 0)));
1078 } 1078 }
1079 1079
1080 1080
1081 BUILTIN(GeneratorPoisonPill) {
1082 HandleScope scope(isolate);
1083 return isolate->Throw(*isolate->factory()->NewTypeError(
1084 "generator_poison_pill", HandleVector<Object>(NULL, 0)));
1085 }
1086
1087
1081 // ----------------------------------------------------------------------------- 1088 // -----------------------------------------------------------------------------
1082 // 1089 //
1083 1090
1084 1091
1085 // Searches the hidden prototype chain of the given object for the first 1092 // Searches the hidden prototype chain of the given object for the first
1086 // object that is an instance of the given type. If no such object can 1093 // object that is an instance of the given type. If no such object can
1087 // be found then Heap::null_value() is returned. 1094 // be found then Heap::null_value() is returned.
1088 static inline Object* FindHidden(Heap* heap, 1095 static inline Object* FindHidden(Heap* heap,
1089 Object* object, 1096 Object* object,
1090 FunctionTemplateInfo* type) { 1097 FunctionTemplateInfo* type) {
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
1706 } 1713 }
1707 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) 1714 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C)
1708 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) 1715 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A)
1709 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) 1716 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H)
1710 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 1717 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
1711 #undef DEFINE_BUILTIN_ACCESSOR_C 1718 #undef DEFINE_BUILTIN_ACCESSOR_C
1712 #undef DEFINE_BUILTIN_ACCESSOR_A 1719 #undef DEFINE_BUILTIN_ACCESSOR_A
1713 1720
1714 1721
1715 } } // namespace v8::internal 1722 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/builtins.h ('k') | src/messages.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698