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

Side by Side Diff: src/handles.cc

Issue 3446028: Merge r5509, r5512, r5530 to 2.3 branch ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/2.3/
Patch Set: '' Created 10 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/debug.cc ('k') | src/objects.h » ('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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 } 460 }
461 461
462 462
463 // Init line_ends array with code positions of line ends inside script 463 // Init line_ends array with code positions of line ends inside script
464 // source. 464 // source.
465 void InitScriptLineEnds(Handle<Script> script) { 465 void InitScriptLineEnds(Handle<Script> script) {
466 if (!script->line_ends()->IsUndefined()) return; 466 if (!script->line_ends()->IsUndefined()) return;
467 467
468 if (!script->source()->IsString()) { 468 if (!script->source()->IsString()) {
469 ASSERT(script->source()->IsUndefined()); 469 ASSERT(script->source()->IsUndefined());
470 script->set_line_ends(*(Factory::NewFixedArray(0))); 470 Handle<FixedArray> empty = Factory::NewFixedArray(0);
471 script->set_line_ends(*empty);
471 ASSERT(script->line_ends()->IsFixedArray()); 472 ASSERT(script->line_ends()->IsFixedArray());
472 return; 473 return;
473 } 474 }
474 475
475 Handle<String> src(String::cast(script->source())); 476 Handle<String> src(String::cast(script->source()));
476 477
477 Handle<FixedArray> array = CalculateLineEnds(src, true); 478 Handle<FixedArray> array = CalculateLineEnds(src, true);
478 479
479 script->set_line_ends(*array); 480 script->set_line_ends(*array);
480 ASSERT(script->line_ends()->IsFixedArray()); 481 ASSERT(script->line_ends()->IsFixedArray());
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 824
824 OptimizedObjectForAddingMultipleProperties:: 825 OptimizedObjectForAddingMultipleProperties::
825 ~OptimizedObjectForAddingMultipleProperties() { 826 ~OptimizedObjectForAddingMultipleProperties() {
826 // Reoptimize the object to allow fast property access. 827 // Reoptimize the object to allow fast property access.
827 if (has_been_transformed_) { 828 if (has_been_transformed_) {
828 TransformToFastProperties(object_, unused_property_fields_); 829 TransformToFastProperties(object_, unused_property_fields_);
829 } 830 }
830 } 831 }
831 832
832 } } // namespace v8::internal 833 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/debug.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698