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

Side by Side Diff: src/compiler.cc

Issue 8306023: Port r9643 to the 3.3 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.3
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 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 } 503 }
504 504
505 script->set_data(script_data.is_null() ? HEAP->undefined_value() 505 script->set_data(script_data.is_null() ? HEAP->undefined_value()
506 : *script_data); 506 : *script_data);
507 507
508 // Compile the function and add it to the cache. 508 // Compile the function and add it to the cache.
509 CompilationInfo info(script); 509 CompilationInfo info(script);
510 info.MarkAsGlobal(); 510 info.MarkAsGlobal();
511 info.SetExtension(extension); 511 info.SetExtension(extension);
512 info.SetPreParseData(pre_data); 512 info.SetPreParseData(pre_data);
513 if (natives == NATIVES_CODE) info.MarkAsAllowingNativesSyntax();
514 result = MakeFunctionInfo(&info); 513 result = MakeFunctionInfo(&info);
515 if (extension == NULL && !result.is_null()) { 514 if (extension == NULL && !result.is_null()) {
516 compilation_cache->PutScript(source, result); 515 compilation_cache->PutScript(source, result);
517 } 516 }
518 517
519 // Get rid of the pre-parsing data (if necessary). 518 // Get rid of the pre-parsing data (if necessary).
520 if (input_pre_data == NULL && pre_data != NULL) { 519 if (input_pre_data == NULL && pre_data != NULL) {
521 delete pre_data; 520 delete pre_data;
522 } 521 }
523 } 522 }
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 shared->DebugName())); 778 shared->DebugName()));
780 } 779 }
781 } 780 }
782 781
783 GDBJIT(AddCode(Handle<String>(shared->DebugName()), 782 GDBJIT(AddCode(Handle<String>(shared->DebugName()),
784 Handle<Script>(info->script()), 783 Handle<Script>(info->script()),
785 Handle<Code>(info->code()))); 784 Handle<Code>(info->code())));
786 } 785 }
787 786
788 } } // namespace v8::internal 787 } } // 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