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

Side by Side Diff: src/builtins.cc

Issue 769263002: Add support for enabling DCHECKs in release mode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 6 years 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/base/once.h" 9 #include "src/base/once.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 static Object* Builtin_##name( \ 125 static Object* Builtin_##name( \
126 int args_length, Object** args_object, Isolate* isolate) { \ 126 int args_length, Object** args_object, Isolate* isolate) { \
127 name##ArgumentsType args(args_length, args_object); \ 127 name##ArgumentsType args(args_length, args_object); \
128 return Builtin_impl##name(args, isolate); \ 128 return Builtin_impl##name(args, isolate); \
129 } \ 129 } \
130 static Object* Builtin_impl##name( \ 130 static Object* Builtin_impl##name( \
131 name##ArgumentsType args, Isolate* isolate) 131 name##ArgumentsType args, Isolate* isolate)
132 #endif 132 #endif
133 133
134 134
135 #ifdef DEBUG 135 #if DCHECK_IS_ON
136 static inline bool CalledAsConstructor(Isolate* isolate) { 136 static inline bool CalledAsConstructor(Isolate* isolate) {
137 // Calculate the result using a full stack frame iterator and check 137 // Calculate the result using a full stack frame iterator and check
138 // that the state of the stack is as we assume it to be in the 138 // that the state of the stack is as we assume it to be in the
139 // code below. 139 // code below.
140 StackFrameIterator it(isolate); 140 StackFrameIterator it(isolate);
141 DCHECK(it.frame()->is_exit()); 141 DCHECK(it.frame()->is_exit());
142 it.Advance(); 142 it.Advance();
143 StackFrame* frame = it.frame(); 143 StackFrame* frame = it.frame();
144 bool reference_result = frame->is_construct(); 144 bool reference_result = frame->is_construct();
145 Address fp = Isolate::c_entry_fp(isolate->thread_local_top()); 145 Address fp = Isolate::c_entry_fp(isolate->thread_local_top());
(...skipping 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after
1644 } 1644 }
1645 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) 1645 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C)
1646 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) 1646 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A)
1647 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) 1647 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H)
1648 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 1648 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
1649 #undef DEFINE_BUILTIN_ACCESSOR_C 1649 #undef DEFINE_BUILTIN_ACCESSOR_C
1650 #undef DEFINE_BUILTIN_ACCESSOR_A 1650 #undef DEFINE_BUILTIN_ACCESSOR_A
1651 1651
1652 1652
1653 } } // namespace v8::internal 1653 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698