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

Side by Side Diff: src/x64/full-codegen-x64.cc

Issue 8344082: Replace boolean indications of strict mode by an enum value. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Some fixes and adapted the preparser. Created 9 years, 2 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 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 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 // space for nested functions that don't need literals cloning. If 1048 // space for nested functions that don't need literals cloning. If
1049 // we're running with the --always-opt or the --prepare-always-opt 1049 // we're running with the --always-opt or the --prepare-always-opt
1050 // flag, we need to use the runtime function so that the new function 1050 // flag, we need to use the runtime function so that the new function
1051 // we are creating here gets a chance to have its code optimized and 1051 // we are creating here gets a chance to have its code optimized and
1052 // doesn't just get a copy of the existing unoptimized code. 1052 // doesn't just get a copy of the existing unoptimized code.
1053 if (!FLAG_always_opt && 1053 if (!FLAG_always_opt &&
1054 !FLAG_prepare_always_opt && 1054 !FLAG_prepare_always_opt &&
1055 !pretenure && 1055 !pretenure &&
1056 scope()->is_function_scope() && 1056 scope()->is_function_scope() &&
1057 info->num_literals() == 0) { 1057 info->num_literals() == 0) {
1058 FastNewClosureStub stub(info->strict_mode() ? kStrictMode : kNonStrictMode); 1058 FastNewClosureStub stub(info->strict_mode_flag());
1059 __ Push(info); 1059 __ Push(info);
1060 __ CallStub(&stub); 1060 __ CallStub(&stub);
1061 } else { 1061 } else {
1062 __ push(rsi); 1062 __ push(rsi);
1063 __ Push(info); 1063 __ Push(info);
1064 __ Push(pretenure 1064 __ Push(pretenure
1065 ? isolate()->factory()->true_value() 1065 ? isolate()->factory()->true_value()
1066 : isolate()->factory()->false_value()); 1066 : isolate()->factory()->false_value());
1067 __ CallRuntime(Runtime::kNewClosure, 3); 1067 __ CallRuntime(Runtime::kNewClosure, 3);
1068 } 1068 }
(...skipping 3167 matching lines...) Expand 10 before | Expand all | Expand 10 after
4236 *context_length = 0; 4236 *context_length = 0;
4237 return previous_; 4237 return previous_;
4238 } 4238 }
4239 4239
4240 4240
4241 #undef __ 4241 #undef __
4242 4242
4243 } } // namespace v8::internal 4243 } } // namespace v8::internal
4244 4244
4245 #endif // V8_TARGET_ARCH_X64 4245 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/compiler.cc ('K') | « src/scopes.cc ('k') | src/x64/lithium-codegen-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698