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

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 78813003: Add trigonometric table to the snapshot. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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
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 5868 matching lines...) Expand 10 before | Expand all | Expand 10 after
5879 void ArrayConstructorStubBase::GenerateStubsAheadOfTime(Isolate* isolate) { 5879 void ArrayConstructorStubBase::GenerateStubsAheadOfTime(Isolate* isolate) {
5880 ArrayConstructorStubAheadOfTimeHelper<ArrayNoArgumentConstructorStub>( 5880 ArrayConstructorStubAheadOfTimeHelper<ArrayNoArgumentConstructorStub>(
5881 isolate); 5881 isolate);
5882 ArrayConstructorStubAheadOfTimeHelper<ArraySingleArgumentConstructorStub>( 5882 ArrayConstructorStubAheadOfTimeHelper<ArraySingleArgumentConstructorStub>(
5883 isolate); 5883 isolate);
5884 ArrayConstructorStubAheadOfTimeHelper<ArrayNArgumentsConstructorStub>( 5884 ArrayConstructorStubAheadOfTimeHelper<ArrayNArgumentsConstructorStub>(
5885 isolate); 5885 isolate);
5886 } 5886 }
5887 5887
5888 5888
5889 void InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(
5890 Isolate* isolate) {
5891 ElementsKind kinds[2] = { FAST_ELEMENTS, FAST_HOLEY_ELEMENTS };
5892 for (int i = 0; i < 2; i++) {
5893 // For internal arrays we only need a few things
5894 InternalArrayNoArgumentConstructorStub stubh1(kinds[i]);
5895 stubh1.GetCode(isolate)->set_is_pregenerated(true);
5896 InternalArraySingleArgumentConstructorStub stubh2(kinds[i]);
5897 stubh2.GetCode(isolate)->set_is_pregenerated(true);
5898 InternalArrayNArgumentsConstructorStub stubh3(kinds[i]);
5899 stubh3.GetCode(isolate)->set_is_pregenerated(true);
5900 }
5901 }
5902
5903
5904 void ArrayConstructorStub::GenerateDispatchToArrayStub( 5889 void ArrayConstructorStub::GenerateDispatchToArrayStub(
5905 MacroAssembler* masm, 5890 MacroAssembler* masm,
5906 AllocationSiteOverrideMode mode) { 5891 AllocationSiteOverrideMode mode) {
5907 if (argument_count_ == ANY) { 5892 if (argument_count_ == ANY) {
5908 Label not_zero_case, not_one_case; 5893 Label not_zero_case, not_one_case;
5909 __ test(eax, eax); 5894 __ test(eax, eax);
5910 __ j(not_zero, &not_zero_case); 5895 __ j(not_zero, &not_zero_case);
5911 CreateArrayDispatch<ArrayNoArgumentConstructorStub>(masm, mode); 5896 CreateArrayDispatch<ArrayNoArgumentConstructorStub>(masm, mode);
5912 5897
5913 __ bind(&not_zero_case); 5898 __ bind(&not_zero_case);
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
6051 __ mov(ecx, FieldOperand(ecx, Map::kBitField2Offset)); 6036 __ mov(ecx, FieldOperand(ecx, Map::kBitField2Offset));
6052 // Retrieve elements_kind from bit field 2. 6037 // Retrieve elements_kind from bit field 2.
6053 __ and_(ecx, Map::kElementsKindMask); 6038 __ and_(ecx, Map::kElementsKindMask);
6054 __ shr(ecx, Map::kElementsKindShift); 6039 __ shr(ecx, Map::kElementsKindShift);
6055 6040
6056 if (FLAG_debug_code) { 6041 if (FLAG_debug_code) {
6057 Label done; 6042 Label done;
6058 __ cmp(ecx, Immediate(FAST_ELEMENTS)); 6043 __ cmp(ecx, Immediate(FAST_ELEMENTS));
6059 __ j(equal, &done); 6044 __ j(equal, &done);
6060 __ cmp(ecx, Immediate(FAST_HOLEY_ELEMENTS)); 6045 __ cmp(ecx, Immediate(FAST_HOLEY_ELEMENTS));
6046 __ j(equal, &done);
6047 __ cmp(ecx, Immediate(FAST_DOUBLE_ELEMENTS));
6061 __ Assert(equal, 6048 __ Assert(equal,
6062 kInvalidElementsKindForInternalArrayOrInternalPackedArray); 6049 kInvalidElementsKindForInternalArrayOrInternalPackedArray);
6063 __ bind(&done); 6050 __ bind(&done);
6064 } 6051 }
6065 6052
6066 Label fast_elements_case; 6053 Label fast_elements_case, fast_holey_elements_case;
6067 __ cmp(ecx, Immediate(FAST_ELEMENTS)); 6054 __ cmp(ecx, Immediate(FAST_ELEMENTS));
6068 __ j(equal, &fast_elements_case); 6055 __ j(equal, &fast_elements_case);
6056 __ cmp(ecx, Immediate(FAST_HOLEY_ELEMENTS));
6057 __ j(equal, &fast_holey_elements_case);
6058
6059 GenerateCase(masm, FAST_DOUBLE_ELEMENTS);
6060
6061 __ bind(&fast_holey_elements_case);
6069 GenerateCase(masm, FAST_HOLEY_ELEMENTS); 6062 GenerateCase(masm, FAST_HOLEY_ELEMENTS);
6070 6063
6071 __ bind(&fast_elements_case); 6064 __ bind(&fast_elements_case);
6072 GenerateCase(masm, FAST_ELEMENTS); 6065 GenerateCase(masm, FAST_ELEMENTS);
6073 } 6066 }
6074 6067
6075 6068
6076 #undef __ 6069 #undef __
6077 6070
6078 } } // namespace v8::internal 6071 } } // namespace v8::internal
6079 6072
6080 #endif // V8_TARGET_ARCH_IA32 6073 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698