#undef __
+#ifdef DEBUG
// add(r0, pc, Operand(-8))
static const uint32_t kCodeAgePatchFirstInstruction = 0xe24f0008;
+#endif
static byte* GetNoCodeAgeSequence(uint32_t* length) {
// The sequence of instructions that is patched out for aging code is the
public:
CallInterceptorCompiler(CallStubCompiler* stub_compiler,
const ParameterCount& arguments,
- Register name,
- ExtraICState extra_ic_state)
+ Register name)
: stub_compiler_(stub_compiler),
arguments_(arguments),
- name_(name),
- extra_ic_state_(extra_ic_state) {}
+ name_(name) {}
void Compile(MacroAssembler* masm,
Handle<JSObject> object,
CallStubCompiler* stub_compiler_;
const ParameterCount& arguments_;
Register name_;
- ExtraICState extra_ic_state_;
};
// Get the receiver from the stack.
__ ldr(r1, MemOperand(sp, argc * kPointerSize));
- CallInterceptorCompiler compiler(this, arguments(), r2, extra_state());
+ CallInterceptorCompiler compiler(this, arguments(), r2);
compiler.Compile(masm(), object, holder, name, &lookup, r1, r3, r4, r0,
&miss);
// dropped, and last non-zero chunk tagged with 1.)
+#ifdef DEBUG
const int kMaxStandardNonCompactModes = 14;
+#endif
const int kTagBits = 2;
const int kTagMask = (1 << kTagBits) - 1;
#endif
-static inline bool CalledAsConstructor(Isolate* isolate) {
#ifdef DEBUG
+static inline bool CalledAsConstructor(Isolate* isolate) {
// Calculate the result using a full stack frame iterator and check
// that the state of the stack is as we assume it to be in the
// code below.
it.Advance();
StackFrame* frame = it.frame();
bool reference_result = frame->is_construct();
-#endif
Address fp = Isolate::c_entry_fp(isolate->thread_local_top());
// Because we know fp points to an exit frame we can use the relevant
// part of ExitFrame::ComputeCallerState directly.
ASSERT_EQ(result, reference_result);
return result;
}
+#endif
// ----------------------------------------------------------------------------
{V8_2PART_UINT64_C(0xaf87023b, 9bf0ee6b), 1066, 340},
};
+#ifdef DEBUG
static const int kCachedPowersLength = ARRAY_SIZE(kCachedPowers);
+#endif
+
static const int kCachedPowersOffset = 348; // -1 * the first decimal_exponent.
static const double kD_1_LOG2_10 = 0.30102999566398114; // 1 / lg(10)
// Difference between the decimal exponents in the table above.
namespace internal {
-static const int kDays4Years[] = {0, 365, 2 * 365, 3 * 365 + 1};
static const int kDaysIn4Years = 4 * 365 + 1;
static const int kDaysIn100Years = 25 * kDaysIn4Years - 1;
static const int kDaysIn400Years = 4 * kDaysIn100Years + 1;
} // namespace
+
HeapSnapshot::HeapSnapshot(HeapProfiler* profiler,
const char* title,
unsigned uid)
STATIC_CHECK(
sizeof(HeapEntry) ==
SnapshotSizeConstants<kPointerSize>::kExpectedHeapEntrySize);
+ USE(SnapshotSizeConstants<4>::kExpectedHeapGraphEdgeSize);
+ USE(SnapshotSizeConstants<4>::kExpectedHeapEntrySize);
+ USE(SnapshotSizeConstants<8>::kExpectedHeapGraphEdgeSize);
+ USE(SnapshotSizeConstants<8>::kExpectedHeapEntrySize);
for (int i = 0; i < VisitorSynchronization::kNumberOfSyncTags; ++i) {
gc_subroot_indexes_[i] = HeapEntry::kNoEntry;
}
static const byte kJnsInstruction = 0x79;
static const byte kJnsOffset = 0x11;
-static const byte kCallInstruction = 0xe8;
static const byte kNopByteOne = 0x66;
static const byte kNopByteTwo = 0x90;
+#ifdef DEBUG
+static const byte kCallInstruction = 0xe8;
+#endif
void BackEdgeTable::PatchAt(Code* unoptimized_code,
public:
CallInterceptorCompiler(CallStubCompiler* stub_compiler,
const ParameterCount& arguments,
- Register name,
- ExtraICState extra_state)
+ Register name)
: stub_compiler_(stub_compiler),
arguments_(arguments),
name_(name) {}
// Get the receiver from the stack.
__ mov(edx, Operand(esp, (argc + 1) * kPointerSize));
- CallInterceptorCompiler compiler(this, arguments(), ecx, extra_state());
+ CallInterceptorCompiler compiler(this, arguments(), ecx);
compiler.Compile(masm(), object, holder, name, &lookup, edx, ebx, edi, eax,
&miss);
static const byte kUtf8MultiByteMask = 0xC0;
-static const byte kUtf8MultiByteCharStart = 0xC0;
static const byte kUtf8MultiByteCharFollower = 0x80;
#ifdef DEBUG
+static const byte kUtf8MultiByteCharStart = 0xC0;
static bool IsUtf8MultiCharacterStart(byte first_byte) {
return (first_byte & kUtf8MultiByteMask) == kUtf8MultiByteCharStart;
}
static const byte kJnsInstruction = 0x79;
static const byte kJnsOffset = 0x1d;
-static const byte kCallInstruction = 0xe8;
static const byte kNopByteOne = 0x66;
static const byte kNopByteTwo = 0x90;
+#ifdef DEBUG
+static const byte kCallInstruction = 0xe8;
+#endif
void BackEdgeTable::PatchAt(Code* unoptimized_code,
public:
CallInterceptorCompiler(CallStubCompiler* stub_compiler,
const ParameterCount& arguments,
- Register name,
- ExtraICState extra_ic_state)
+ Register name)
: stub_compiler_(stub_compiler),
arguments_(arguments),
- name_(name),
- extra_ic_state_(extra_ic_state) {}
+ name_(name) {}
void Compile(MacroAssembler* masm,
Handle<JSObject> object,
CallStubCompiler* stub_compiler_;
const ParameterCount& arguments_;
Register name_;
- ExtraICState extra_ic_state_;
};
StackArgumentsAccessor args(rsp, arguments());
__ movq(rdx, args.GetReceiverOperand());
- CallInterceptorCompiler compiler(this, arguments(), rcx, extra_state());
+ CallInterceptorCompiler compiler(this, arguments(), rcx);
compiler.Compile(masm(), object, holder, name, &lookup, rdx, rbx, rdi, rax,
&miss);
template <typename T> static void USE(T) { }
-// This test is not intended to be run, just type checked.
-static inline void PersistentHandles(v8::Isolate* isolate) {
- USE(PersistentHandles);
+// The point of this test is type checking. We run it only so compilers
+// don't complain about an unused function.
+TEST(PersistentHandles) {
+ LocalContext env;
+ v8::Isolate* isolate = CcTest::isolate();
+ v8::HandleScope scope(isolate);
Local<String> str = v8_str("foo");
v8::Persistent<String> p_str(isolate, str);
p_str.Reset();
}
-static const int k0CacheSize = 16;
-
THREADED_TEST(FillJSFunctionResultCache) {
i::FLAG_allow_natives_syntax = true;
LocalContext context;
}
-static inline i::Address ToAddress(int n) {
- return reinterpret_cast<i::Address>(n);
-}
-
static void EnqueueTickSampleEvent(ProfilerEventsProcessor* proc,
i::Address frame1,
i::Address frame2 = NULL,
// Size of temp buffer for formatting small strings.
#define SMALL_STRING_BUFFER_SIZE 80
-// --- A d d i t i o n a l C h e c k H e l p e r s
-
-
-// Helper function used by the CHECK_EQ function when given Address
-// arguments. Should not be called directly.
-static inline void CheckEqualsHelper(const char* file, int line,
- const char* expected_source,
- ::v8::internal::Address expected,
- const char* value_source,
- ::v8::internal::Address value) {
- if (expected != value) {
- V8_Fatal(file, line, "CHECK_EQ(%s, %s) failed\n# "
- "Expected: %i\n# Found: %i",
- expected_source, value_source, expected, value);
- }
-}
-
-
-// Helper function used by the CHECK_NE function when given Address
-// arguments. Should not be called directly.
-static inline void CheckNonEqualsHelper(const char* file, int line,
- const char* unexpected_source,
- ::v8::internal::Address unexpected,
- const char* value_source,
- ::v8::internal::Address value) {
- if (unexpected == value) {
- V8_Fatal(file, line, "CHECK_NE(%s, %s) failed\n# Value: %i",
- unexpected_source, value_source, value);
- }
-}
-
-
-// Helper function used by the CHECK function when given code
-// arguments. Should not be called directly.
-static inline void CheckEqualsHelper(const char* file, int line,
- const char* expected_source,
- const Code* expected,
- const char* value_source,
- const Code* value) {
- if (expected != value) {
- V8_Fatal(file, line, "CHECK_EQ(%s, %s) failed\n# "
- "Expected: %p\n# Found: %p",
- expected_source, value_source, expected, value);
- }
-}
-
-
-static inline void CheckNonEqualsHelper(const char* file, int line,
- const char* expected_source,
- const Code* expected,
- const char* value_source,
- const Code* value) {
- if (expected == value) {
- V8_Fatal(file, line, "CHECK_NE(%s, %s) failed\n# Value: %p",
- expected_source, value_source, value);
- }
-}
-
-
// --- H e l p e r C l a s s e s