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

Side by Side Diff: src/builtins.cc

Issue 6696018: Revert "Strict mode ThrowTypeError functions for" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 // -----------------------------------------------------------------------------
980 // 962 //
981 963
982 964
983 // Returns the holder JSObject if the function can legally be called 965 // Returns the holder JSObject if the function can legally be called
984 // with this receiver. Returns Heap::null_value() if the call is 966 // with this receiver. Returns Heap::null_value() if the call is
985 // illegal. Any arguments that don't fit the expected type is 967 // illegal. Any arguments that don't fit the expected type is
986 // overwritten with undefined. Arguments that do fit the expected 968 // overwritten with undefined. Arguments that do fit the expected
987 // type is overwritten with the object in the prototype chain that 969 // type is overwritten with the object in the prototype chain that
988 // actually has that type. 970 // actually has that type.
989 static inline Object* TypeCheck(int argc, 971 static inline Object* TypeCheck(int argc,
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
1595 if (entry->contains(pc)) { 1577 if (entry->contains(pc)) {
1596 return names_[i]; 1578 return names_[i];
1597 } 1579 }
1598 } 1580 }
1599 } 1581 }
1600 return NULL; 1582 return NULL;
1601 } 1583 }
1602 1584
1603 1585
1604 } } // namespace v8::internal 1586 } } // 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