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

Side by Side Diff: src/builtins.cc

Issue 6691003: Strict mode poision pills. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Kraken fix. Created 9 years, 9 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/contexts.h » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 952
953 // Set the length and elements. 953 // Set the length and elements.
954 result_array->set_length(Smi::FromInt(result_len)); 954 result_array->set_length(Smi::FromInt(result_len));
955 result_array->set_elements(result_elms); 955 result_array->set_elements(result_elms);
956 956
957 return result_array; 957 return result_array;
958 } 958 }
959 959
960 960
961 // ----------------------------------------------------------------------------- 961 // -----------------------------------------------------------------------------
962 // Strict mode poison pills
963
964
965 BUILTIN(StrictFunctionCaller) {
966 HandleScope scope;
967 return Top::Throw(*Factory::NewTypeError("strict_function_caller",
968 HandleVector<Object>(NULL, 0)));
969 }
970
971
972 BUILTIN(StrictFunctionArguments) {
973 HandleScope scope;
974 return Top::Throw(*Factory::NewTypeError("strict_function_arguments",
975 HandleVector<Object>(NULL, 0)));
976 }
977
978
979 // -----------------------------------------------------------------------------
962 // 980 //
963 981
964 982
965 // Returns the holder JSObject if the function can legally be called 983 // Returns the holder JSObject if the function can legally be called
966 // with this receiver. Returns Heap::null_value() if the call is 984 // with this receiver. Returns Heap::null_value() if the call is
967 // illegal. Any arguments that don't fit the expected type is 985 // illegal. Any arguments that don't fit the expected type is
968 // overwritten with undefined. Arguments that do fit the expected 986 // overwritten with undefined. Arguments that do fit the expected
969 // type is overwritten with the object in the prototype chain that 987 // type is overwritten with the object in the prototype chain that
970 // actually has that type. 988 // actually has that type.
971 static inline Object* TypeCheck(int argc, 989 static inline Object* TypeCheck(int argc,
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
1577 if (entry->contains(pc)) { 1595 if (entry->contains(pc)) {
1578 return names_[i]; 1596 return names_[i];
1579 } 1597 }
1580 } 1598 }
1581 } 1599 }
1582 return NULL; 1600 return NULL;
1583 } 1601 }
1584 1602
1585 1603
1586 } } // namespace v8::internal 1604 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/builtins.h ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698