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

Side by Side Diff: src/isolate.cc

Issue 12459011: Avoid bool to Oddball conversions by being lazy. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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/execution.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 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 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 if (options & StackTrace::kScriptNameOrSourceURL) { 747 if (options & StackTrace::kScriptNameOrSourceURL) {
748 Handle<Object> result = GetScriptNameOrSourceURL(script); 748 Handle<Object> result = GetScriptNameOrSourceURL(script);
749 CHECK_NOT_EMPTY_HANDLE(this, 749 CHECK_NOT_EMPTY_HANDLE(this,
750 JSObject::SetLocalPropertyIgnoreAttributes( 750 JSObject::SetLocalPropertyIgnoreAttributes(
751 stack_frame, script_name_or_source_url_key, 751 stack_frame, script_name_or_source_url_key,
752 result, NONE)); 752 result, NONE));
753 } 753 }
754 754
755 if (options & StackTrace::kFunctionName) { 755 if (options & StackTrace::kFunctionName) {
756 Handle<Object> fun_name(fun->shared()->name(), this); 756 Handle<Object> fun_name(fun->shared()->name(), this);
757 if (fun_name->ToBoolean()->IsFalse()) { 757 if (!fun_name->BooleanValue()) {
758 fun_name = Handle<Object>(fun->shared()->inferred_name(), this); 758 fun_name = Handle<Object>(fun->shared()->inferred_name(), this);
759 } 759 }
760 CHECK_NOT_EMPTY_HANDLE(this, 760 CHECK_NOT_EMPTY_HANDLE(this,
761 JSObject::SetLocalPropertyIgnoreAttributes( 761 JSObject::SetLocalPropertyIgnoreAttributes(
762 stack_frame, function_key, fun_name, NONE)); 762 stack_frame, function_key, fun_name, NONE));
763 } 763 }
764 764
765 if (options & StackTrace::kIsEval) { 765 if (options & StackTrace::kIsEval) {
766 int type = Smi::cast(script->compilation_type())->value(); 766 int type = Smi::cast(script->compilation_type())->value();
767 Handle<Object> is_eval = (type == Script::COMPILATION_TYPE_EVAL) ? 767 Handle<Object> is_eval = (type == Script::COMPILATION_TYPE_EVAL) ?
(...skipping 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after
2340 2340
2341 #ifdef DEBUG 2341 #ifdef DEBUG
2342 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 2342 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
2343 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 2343 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
2344 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 2344 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
2345 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 2345 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
2346 #undef ISOLATE_FIELD_OFFSET 2346 #undef ISOLATE_FIELD_OFFSET
2347 #endif 2347 #endif
2348 2348
2349 } } // namespace v8::internal 2349 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/execution.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698