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

Side by Side Diff: src/accessors.cc

Issue 177683002: Mode clean-up pt 1: rename classic/non-strict mode to sloppy mode (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 } 904 }
905 if (!caller->shared()->native() && potential_caller != NULL) { 905 if (!caller->shared()->native() && potential_caller != NULL) {
906 caller = potential_caller; 906 caller = potential_caller;
907 } 907 }
908 // If caller is bound, return null. This is compatible with JSC, and 908 // If caller is bound, return null. This is compatible with JSC, and
909 // allows us to make bound functions use the strict function map 909 // allows us to make bound functions use the strict function map
910 // and its associated throwing caller and arguments. 910 // and its associated throwing caller and arguments.
911 if (caller->shared()->bound()) { 911 if (caller->shared()->bound()) {
912 return isolate->heap()->null_value(); 912 return isolate->heap()->null_value();
913 } 913 }
914 // Censor if the caller is not a classic mode function. 914 // Censor if the caller is not a sloppy mode function.
915 // Change from ES5, which used to throw, see: 915 // Change from ES5, which used to throw, see:
916 // https://bugs.ecmascript.org/show_bug.cgi?id=310 916 // https://bugs.ecmascript.org/show_bug.cgi?id=310
917 if (!caller->shared()->is_classic_mode()) { 917 if (!caller->shared()->is_sloppy_mode()) {
918 return isolate->heap()->null_value(); 918 return isolate->heap()->null_value();
919 } 919 }
920 920
921 return caller; 921 return caller;
922 } 922 }
923 923
924 924
925 const AccessorDescriptor Accessors::FunctionCaller = { 925 const AccessorDescriptor Accessors::FunctionCaller = {
926 FunctionGetCaller, 926 FunctionGetCaller,
927 ReadOnlySetAccessor, 927 ReadOnlySetAccessor,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 info->set_data(Smi::FromInt(index)); 988 info->set_data(Smi::FromInt(index));
989 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); 989 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport);
990 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); 990 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport);
991 info->set_getter(*getter); 991 info->set_getter(*getter);
992 if (!(attributes & ReadOnly)) info->set_setter(*setter); 992 if (!(attributes & ReadOnly)) info->set_setter(*setter);
993 return info; 993 return info;
994 } 994 }
995 995
996 996
997 } } // namespace v8::internal 997 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/a64/lithium-codegen-a64.cc ('k') | src/api.cc » ('j') | src/globals.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698