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

Side by Side Diff: src/compiler.cc

Issue 9706025: Fix --use-strict flag in combination with --harmony[-scoping]. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 } 514 }
515 515
516 script->set_data(script_data.is_null() ? HEAP->undefined_value() 516 script->set_data(script_data.is_null() ? HEAP->undefined_value()
517 : *script_data); 517 : *script_data);
518 518
519 // Compile the function and add it to the cache. 519 // Compile the function and add it to the cache.
520 CompilationInfo info(script); 520 CompilationInfo info(script);
521 info.MarkAsGlobal(); 521 info.MarkAsGlobal();
522 info.SetExtension(extension); 522 info.SetExtension(extension);
523 info.SetPreParseData(pre_data); 523 info.SetPreParseData(pre_data);
524 if (FLAG_use_strict) info.SetLanguageMode(STRICT_MODE); 524 if (FLAG_use_strict) {
525 info.SetLanguageMode(FLAG_harmony_scoping ? EXTENDED_MODE : STRICT_MODE);
526 }
525 result = MakeFunctionInfo(&info); 527 result = MakeFunctionInfo(&info);
526 if (extension == NULL && !result.is_null()) { 528 if (extension == NULL && !result.is_null()) {
527 compilation_cache->PutScript(source, result); 529 compilation_cache->PutScript(source, result);
528 } 530 }
529 } 531 }
530 532
531 if (result.is_null()) isolate->ReportPendingMessages(); 533 if (result.is_null()) isolate->ReportPendingMessages();
532 return result; 534 return result;
533 } 535 }
534 536
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 } 806 }
805 } 807 }
806 808
807 GDBJIT(AddCode(Handle<String>(shared->DebugName()), 809 GDBJIT(AddCode(Handle<String>(shared->DebugName()),
808 Handle<Script>(info->script()), 810 Handle<Script>(info->script()),
809 Handle<Code>(info->code()), 811 Handle<Code>(info->code()),
810 info)); 812 info));
811 } 813 }
812 814
813 } } // namespace v8::internal 815 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698