OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 965 matching lines...) Loading... |
976 result_array->set_elements(result_elms); | 976 result_array->set_elements(result_elms); |
977 | 977 |
978 return result_array; | 978 return result_array; |
979 } | 979 } |
980 | 980 |
981 | 981 |
982 // ----------------------------------------------------------------------------- | 982 // ----------------------------------------------------------------------------- |
983 // Strict mode poison pills | 983 // Strict mode poison pills |
984 | 984 |
985 | 985 |
986 BUILTIN(StrictArgumentsCallee) { | 986 BUILTIN(StrictModePoisonPill) { |
987 HandleScope scope; | 987 HandleScope scope; |
988 return isolate->Throw(*isolate->factory()->NewTypeError( | 988 return isolate->Throw(*isolate->factory()->NewTypeError( |
989 "strict_arguments_callee", HandleVector<Object>(NULL, 0))); | 989 "strict_poison_pill", HandleVector<Object>(NULL, 0))); |
990 } | 990 } |
991 | 991 |
992 | |
993 BUILTIN(StrictArgumentsCaller) { | |
994 HandleScope scope; | |
995 return isolate->Throw(*isolate->factory()->NewTypeError( | |
996 "strict_arguments_caller", HandleVector<Object>(NULL, 0))); | |
997 } | |
998 | |
999 | |
1000 BUILTIN(StrictFunctionCaller) { | |
1001 HandleScope scope; | |
1002 return isolate->Throw(*isolate->factory()->NewTypeError( | |
1003 "strict_function_caller", HandleVector<Object>(NULL, 0))); | |
1004 } | |
1005 | |
1006 | |
1007 BUILTIN(StrictFunctionArguments) { | |
1008 HandleScope scope; | |
1009 return isolate->Throw(*isolate->factory()->NewTypeError( | |
1010 "strict_function_arguments", HandleVector<Object>(NULL, 0))); | |
1011 } | |
1012 | |
1013 | |
1014 // ----------------------------------------------------------------------------- | 992 // ----------------------------------------------------------------------------- |
1015 // | 993 // |
1016 | 994 |
1017 | 995 |
1018 // Returns the holder JSObject if the function can legally be called | 996 // Returns the holder JSObject if the function can legally be called |
1019 // with this receiver. Returns Heap::null_value() if the call is | 997 // with this receiver. Returns Heap::null_value() if the call is |
1020 // illegal. Any arguments that don't fit the expected type is | 998 // illegal. Any arguments that don't fit the expected type is |
1021 // overwritten with undefined. Arguments that do fit the expected | 999 // overwritten with undefined. Arguments that do fit the expected |
1022 // type is overwritten with the object in the prototype chain that | 1000 // type is overwritten with the object in the prototype chain that |
1023 // actually has that type. | 1001 // actually has that type. |
(...skipping 697 matching lines...) Loading... |
1721 return Handle<Code>(code_address); \ | 1699 return Handle<Code>(code_address); \ |
1722 } | 1700 } |
1723 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) | 1701 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) |
1724 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) | 1702 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) |
1725 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 1703 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
1726 #undef DEFINE_BUILTIN_ACCESSOR_C | 1704 #undef DEFINE_BUILTIN_ACCESSOR_C |
1727 #undef DEFINE_BUILTIN_ACCESSOR_A | 1705 #undef DEFINE_BUILTIN_ACCESSOR_A |
1728 | 1706 |
1729 | 1707 |
1730 } } // namespace v8::internal | 1708 } } // namespace v8::internal |
OLD | NEW |