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

Unified Diff: src/accessors.cc

Issue 20758002: Compilation type and state allocate an unnecessary Smi on v8::Script. (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@master
Patch Set: feedback. 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 51db3615c382f38d787333b98ac753bf9e7f83d9..a43eb78b8702d57ca504e734a38e1bc635582bec 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 Script::cast(script)->compilation_type();
+ return Smi::FromInt(Script::cast(script)->compilation_type());
}
@@ -388,8 +388,7 @@ 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.
- int compilation_type = Smi::cast(script->compilation_type())->value();
- if (compilation_type != Script::COMPILATION_TYPE_EVAL) {
+ if (script->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