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

Side by Side Diff: src/full-codegen.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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 } 540 }
541 } 541 }
542 // Invoke the platform-dependent code generator to do the actual 542 // Invoke the platform-dependent code generator to do the actual
543 // declaration the global functions and variables. 543 // declaration the global functions and variables.
544 DeclareGlobals(array); 544 DeclareGlobals(array);
545 } 545 }
546 } 546 }
547 547
548 548
549 int FullCodeGenerator::DeclareGlobalsFlags() { 549 int FullCodeGenerator::DeclareGlobalsFlags() {
550 int flags = 0; 550 ASSERT(DeclareGlobalsStrictModeFlag::is_valid(strict_mode_flag()));
551 if (is_eval()) flags |= kDeclareGlobalsEvalFlag; 551 return DeclareGlobalsEvalFlag::encode(is_eval()) |
552 if (is_strict_mode()) flags |= kDeclareGlobalsStrictModeFlag; 552 DeclareGlobalsStrictModeFlag::encode(strict_mode_flag()) |
553 if (is_native()) flags |= kDeclareGlobalsNativeFlag; 553 DeclareGlobalsNativeFlag::encode(is_native());
554 return flags;
555 } 554 }
556 555
557 556
558 void FullCodeGenerator::SetFunctionPosition(FunctionLiteral* fun) { 557 void FullCodeGenerator::SetFunctionPosition(FunctionLiteral* fun) {
559 CodeGenerator::RecordPositions(masm_, fun->start_position()); 558 CodeGenerator::RecordPositions(masm_, fun->start_position());
560 } 559 }
561 560
562 561
563 void FullCodeGenerator::SetReturnPosition(FunctionLiteral* fun) { 562 void FullCodeGenerator::SetReturnPosition(FunctionLiteral* fun) {
564 CodeGenerator::RecordPositions(masm_, fun->end_position() - 1); 563 CodeGenerator::RecordPositions(masm_, fun->end_position() - 1);
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
1348 } 1347 }
1349 1348
1350 return false; 1349 return false;
1351 } 1350 }
1352 1351
1353 1352
1354 #undef __ 1353 #undef __
1355 1354
1356 1355
1357 } } // namespace v8::internal 1356 } } // namespace v8::internal
OLDNEW
« src/compiler.cc ('K') | « src/full-codegen.h ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698