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

Unified Diff: src/accessors.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, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/accessors.cc
diff --git a/src/accessors.cc b/src/accessors.cc
index a43eb78b8702d57ca504e734a38e1bc635582bec..51db3615c382f38d787333b98ac753bf9e7f83d9 100644
--- a/src/accessors.cc
+++ b/src/accessors.cc
@@ -292,7 +292,7 @@ const AccessorDescriptor Accessors::ScriptType = {
MaybeObject* Accessors::ScriptGetCompilationType(Object* object, void*) {
Object* script = JSValue::cast(object)->value();
- return Smi::FromInt(Script::cast(script)->compilation_type());
+ return Script::cast(script)->compilation_type();
}
@@ -388,7 +388,8 @@ MaybeObject* Accessors::ScriptGetEvalFromScriptPosition(Object* object, void*) {
Handle<Script> script(raw_script);
// If this is not a script compiled through eval there is no eval position.
- if (script->compilation_type() != Script::COMPILATION_TYPE_EVAL) {
+ int compilation_type = Smi::cast(script->compilation_type())->value();
+ if (compilation_type != Script::COMPILATION_TYPE_EVAL) {
return script->GetHeap()->undefined_value();
}
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698