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

Side by Side Diff: src/isolate.cc

Issue 21256003: Reland "Compilation type and state allocate an unnecessary Smi on v8::Script" (r15940). (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/factory.cc ('k') | src/liveedit.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 Handle<Object> fun_name(fun->shared()->name(), this); 809 Handle<Object> fun_name(fun->shared()->name(), this);
810 if (!fun_name->BooleanValue()) { 810 if (!fun_name->BooleanValue()) {
811 fun_name = Handle<Object>(fun->shared()->inferred_name(), this); 811 fun_name = Handle<Object>(fun->shared()->inferred_name(), this);
812 } 812 }
813 CHECK_NOT_EMPTY_HANDLE(this, 813 CHECK_NOT_EMPTY_HANDLE(this,
814 JSObject::SetLocalPropertyIgnoreAttributes( 814 JSObject::SetLocalPropertyIgnoreAttributes(
815 stack_frame, function_key, fun_name, NONE)); 815 stack_frame, function_key, fun_name, NONE));
816 } 816 }
817 817
818 if (options & StackTrace::kIsEval) { 818 if (options & StackTrace::kIsEval) {
819 int type = Smi::cast(script->compilation_type())->value(); 819 Handle<Object> is_eval =
820 Handle<Object> is_eval = (type == Script::COMPILATION_TYPE_EVAL) ? 820 script->compilation_type() == Script::COMPILATION_TYPE_EVAL ?
821 factory()->true_value() : factory()->false_value(); 821 factory()->true_value() : factory()->false_value();
822 CHECK_NOT_EMPTY_HANDLE(this, 822 CHECK_NOT_EMPTY_HANDLE(this,
823 JSObject::SetLocalPropertyIgnoreAttributes( 823 JSObject::SetLocalPropertyIgnoreAttributes(
824 stack_frame, eval_key, is_eval, NONE)); 824 stack_frame, eval_key, is_eval, NONE));
825 } 825 }
826 826
827 if (options & StackTrace::kIsConstructor) { 827 if (options & StackTrace::kIsConstructor) {
828 Handle<Object> is_constructor = (frames[i].is_constructor()) ? 828 Handle<Object> is_constructor = (frames[i].is_constructor()) ?
829 factory()->true_value() : factory()->false_value(); 829 factory()->true_value() : factory()->false_value();
830 CHECK_NOT_EMPTY_HANDLE(this, 830 CHECK_NOT_EMPTY_HANDLE(this,
831 JSObject::SetLocalPropertyIgnoreAttributes( 831 JSObject::SetLocalPropertyIgnoreAttributes(
(...skipping 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after
2522 2522
2523 #ifdef DEBUG 2523 #ifdef DEBUG
2524 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 2524 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
2525 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 2525 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
2526 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 2526 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
2527 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 2527 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
2528 #undef ISOLATE_FIELD_OFFSET 2528 #undef ISOLATE_FIELD_OFFSET
2529 #endif 2529 #endif
2530 2530
2531 } } // namespace v8::internal 2531 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/liveedit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698