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

Side by Side Diff: src/factory.cc

Issue 21062004: Revert 15940: "Compilation type and state allocate an unnecessary Smi on v8::Script." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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.cc ('k') | src/isolate.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 Handle<Foreign> wrapper = NewForeign(0, TENURED); 446 Handle<Foreign> wrapper = NewForeign(0, TENURED);
447 Handle<Script> script = Handle<Script>::cast(NewStruct(SCRIPT_TYPE)); 447 Handle<Script> script = Handle<Script>::cast(NewStruct(SCRIPT_TYPE));
448 script->set_source(*source); 448 script->set_source(*source);
449 script->set_name(heap->undefined_value()); 449 script->set_name(heap->undefined_value());
450 script->set_id(Smi::FromInt(id)); 450 script->set_id(Smi::FromInt(id));
451 script->set_line_offset(Smi::FromInt(0)); 451 script->set_line_offset(Smi::FromInt(0));
452 script->set_column_offset(Smi::FromInt(0)); 452 script->set_column_offset(Smi::FromInt(0));
453 script->set_data(heap->undefined_value()); 453 script->set_data(heap->undefined_value());
454 script->set_context_data(heap->undefined_value()); 454 script->set_context_data(heap->undefined_value());
455 script->set_type(Smi::FromInt(Script::TYPE_NORMAL)); 455 script->set_type(Smi::FromInt(Script::TYPE_NORMAL));
456 script->set_compilation_type(Smi::FromInt(Script::COMPILATION_TYPE_HOST));
457 script->set_compilation_state(
458 Smi::FromInt(Script::COMPILATION_STATE_INITIAL));
456 script->set_wrapper(*wrapper); 459 script->set_wrapper(*wrapper);
457 script->set_line_ends(heap->undefined_value()); 460 script->set_line_ends(heap->undefined_value());
458 script->set_eval_from_shared(heap->undefined_value()); 461 script->set_eval_from_shared(heap->undefined_value());
459 script->set_eval_from_instructions_offset(Smi::FromInt(0)); 462 script->set_eval_from_instructions_offset(Smi::FromInt(0));
460 script->set_flags(Smi::FromInt(0));
461 463
462 return script; 464 return script;
463 } 465 }
464 466
465 467
466 Handle<Foreign> Factory::NewForeign(Address addr, PretenureFlag pretenure) { 468 Handle<Foreign> Factory::NewForeign(Address addr, PretenureFlag pretenure) {
467 CALL_HEAP_FUNCTION(isolate(), 469 CALL_HEAP_FUNCTION(isolate(),
468 isolate()->heap()->AllocateForeign(addr, pretenure), 470 isolate()->heap()->AllocateForeign(addr, pretenure),
469 Foreign); 471 Foreign);
470 } 472 }
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after
1609 return Handle<Object>::null(); 1611 return Handle<Object>::null();
1610 } 1612 }
1611 1613
1612 1614
1613 Handle<Object> Factory::ToBoolean(bool value) { 1615 Handle<Object> Factory::ToBoolean(bool value) {
1614 return value ? true_value() : false_value(); 1616 return value ? true_value() : false_value();
1615 } 1617 }
1616 1618
1617 1619
1618 } } // namespace v8::internal 1620 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698