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

Side by Side Diff: src/compiler.cc

Issue 8314018: Remove redundant allow-natives flag from CompilationInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
« no previous file with comments | « src/compiler.h ('k') | src/parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 } 509 }
510 510
511 script->set_data(script_data.is_null() ? HEAP->undefined_value() 511 script->set_data(script_data.is_null() ? HEAP->undefined_value()
512 : *script_data); 512 : *script_data);
513 513
514 // Compile the function and add it to the cache. 514 // Compile the function and add it to the cache.
515 CompilationInfo info(script); 515 CompilationInfo info(script);
516 info.MarkAsGlobal(); 516 info.MarkAsGlobal();
517 info.SetExtension(extension); 517 info.SetExtension(extension);
518 info.SetPreParseData(pre_data); 518 info.SetPreParseData(pre_data);
519 if (natives == NATIVES_CODE) {
520 info.MarkAsAllowingNativesSyntax();
521 }
522 result = MakeFunctionInfo(&info); 519 result = MakeFunctionInfo(&info);
523 if (extension == NULL && !result.is_null()) { 520 if (extension == NULL && !result.is_null()) {
524 compilation_cache->PutScript(source, result); 521 compilation_cache->PutScript(source, result);
525 } 522 }
526 523
527 // Get rid of the pre-parsing data (if necessary). 524 // Get rid of the pre-parsing data (if necessary).
528 if (input_pre_data == NULL && pre_data != NULL) { 525 if (input_pre_data == NULL && pre_data != NULL) {
529 delete pre_data; 526 delete pre_data;
530 } 527 }
531 } 528 }
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 } 786 }
790 } 787 }
791 788
792 GDBJIT(AddCode(Handle<String>(shared->DebugName()), 789 GDBJIT(AddCode(Handle<String>(shared->DebugName()),
793 Handle<Script>(info->script()), 790 Handle<Script>(info->script()),
794 Handle<Code>(info->code()), 791 Handle<Code>(info->code()),
795 info)); 792 info));
796 } 793 }
797 794
798 } } // namespace v8::internal 795 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler.h ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698