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

Side by Side Diff: src/builtins.cc

Issue 18509003: Keep two empty lines between declarations for cpp files (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 5 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
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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 // has been specialized for each architecture so if any one of them 175 // has been specialized for each architecture so if any one of them
176 // changes this code has to be changed as well. 176 // changes this code has to be changed as well.
177 const int kMarkerOffset = StandardFrameConstants::kMarkerOffset; 177 const int kMarkerOffset = StandardFrameConstants::kMarkerOffset;
178 const Smi* kConstructMarker = Smi::FromInt(StackFrame::CONSTRUCT); 178 const Smi* kConstructMarker = Smi::FromInt(StackFrame::CONSTRUCT);
179 Object* marker = Memory::Object_at(caller_fp + kMarkerOffset); 179 Object* marker = Memory::Object_at(caller_fp + kMarkerOffset);
180 bool result = (marker == kConstructMarker); 180 bool result = (marker == kConstructMarker);
181 ASSERT_EQ(result, reference_result); 181 ASSERT_EQ(result, reference_result);
182 return result; 182 return result;
183 } 183 }
184 184
185
185 // ---------------------------------------------------------------------------- 186 // ----------------------------------------------------------------------------
186 187
187 BUILTIN(Illegal) { 188 BUILTIN(Illegal) {
188 UNREACHABLE(); 189 UNREACHABLE();
189 return isolate->heap()->undefined_value(); // Make compiler happy. 190 return isolate->heap()->undefined_value(); // Make compiler happy.
190 } 191 }
191 192
192 193
193 BUILTIN(EmptyFunction) { 194 BUILTIN(EmptyFunction) {
194 return isolate->heap()->undefined_value(); 195 return isolate->heap()->undefined_value();
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 // ----------------------------------------------------------------------------- 1147 // -----------------------------------------------------------------------------
1147 // Strict mode poison pills 1148 // Strict mode poison pills
1148 1149
1149 1150
1150 BUILTIN(StrictModePoisonPill) { 1151 BUILTIN(StrictModePoisonPill) {
1151 HandleScope scope(isolate); 1152 HandleScope scope(isolate);
1152 return isolate->Throw(*isolate->factory()->NewTypeError( 1153 return isolate->Throw(*isolate->factory()->NewTypeError(
1153 "strict_poison_pill", HandleVector<Object>(NULL, 0))); 1154 "strict_poison_pill", HandleVector<Object>(NULL, 0)));
1154 } 1155 }
1155 1156
1157
1156 // ----------------------------------------------------------------------------- 1158 // -----------------------------------------------------------------------------
1157 // 1159 //
1158 1160
1159 1161
1160 // Searches the hidden prototype chain of the given object for the first 1162 // Searches the hidden prototype chain of the given object for the first
1161 // object that is an instance of the given type. If no such object can 1163 // object that is an instance of the given type. If no such object can
1162 // be found then Heap::null_value() is returned. 1164 // be found then Heap::null_value() is returned.
1163 static inline Object* FindHidden(Heap* heap, 1165 static inline Object* FindHidden(Heap* heap,
1164 Object* object, 1166 Object* object,
1165 FunctionTemplateInfo* type) { 1167 FunctionTemplateInfo* type) {
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
1425 1427
1426 static void Generate_KeyedLoadIC_String(MacroAssembler* masm) { 1428 static void Generate_KeyedLoadIC_String(MacroAssembler* masm) {
1427 KeyedLoadIC::GenerateString(masm); 1429 KeyedLoadIC::GenerateString(masm);
1428 } 1430 }
1429 1431
1430 1432
1431 static void Generate_KeyedLoadIC_PreMonomorphic(MacroAssembler* masm) { 1433 static void Generate_KeyedLoadIC_PreMonomorphic(MacroAssembler* masm) {
1432 KeyedLoadIC::GeneratePreMonomorphic(masm); 1434 KeyedLoadIC::GeneratePreMonomorphic(masm);
1433 } 1435 }
1434 1436
1437
1435 static void Generate_KeyedLoadIC_IndexedInterceptor(MacroAssembler* masm) { 1438 static void Generate_KeyedLoadIC_IndexedInterceptor(MacroAssembler* masm) {
1436 KeyedLoadIC::GenerateIndexedInterceptor(masm); 1439 KeyedLoadIC::GenerateIndexedInterceptor(masm);
1437 } 1440 }
1438 1441
1442
1439 static void Generate_KeyedLoadIC_NonStrictArguments(MacroAssembler* masm) { 1443 static void Generate_KeyedLoadIC_NonStrictArguments(MacroAssembler* masm) {
1440 KeyedLoadIC::GenerateNonStrictArguments(masm); 1444 KeyedLoadIC::GenerateNonStrictArguments(masm);
1441 } 1445 }
1442 1446
1447
1443 static void Generate_StoreIC_Slow(MacroAssembler* masm) { 1448 static void Generate_StoreIC_Slow(MacroAssembler* masm) {
1444 StoreIC::GenerateSlow(masm); 1449 StoreIC::GenerateSlow(masm);
1445 } 1450 }
1446 1451
1447 1452
1448 static void Generate_StoreIC_Initialize(MacroAssembler* masm) { 1453 static void Generate_StoreIC_Initialize(MacroAssembler* masm) {
1449 StoreIC::GenerateInitialize(masm); 1454 StoreIC::GenerateInitialize(masm);
1450 } 1455 }
1451 1456
1452 1457
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1532 1537
1533 static void Generate_KeyedStoreIC_Initialize(MacroAssembler* masm) { 1538 static void Generate_KeyedStoreIC_Initialize(MacroAssembler* masm) {
1534 KeyedStoreIC::GenerateInitialize(masm); 1539 KeyedStoreIC::GenerateInitialize(masm);
1535 } 1540 }
1536 1541
1537 1542
1538 static void Generate_KeyedStoreIC_Initialize_Strict(MacroAssembler* masm) { 1543 static void Generate_KeyedStoreIC_Initialize_Strict(MacroAssembler* masm) {
1539 KeyedStoreIC::GenerateInitialize(masm); 1544 KeyedStoreIC::GenerateInitialize(masm);
1540 } 1545 }
1541 1546
1547
1542 static void Generate_KeyedStoreIC_NonStrictArguments(MacroAssembler* masm) { 1548 static void Generate_KeyedStoreIC_NonStrictArguments(MacroAssembler* masm) {
1543 KeyedStoreIC::GenerateNonStrictArguments(masm); 1549 KeyedStoreIC::GenerateNonStrictArguments(masm);
1544 } 1550 }
1545 1551
1552
1546 static void Generate_TransitionElementsSmiToDouble(MacroAssembler* masm) { 1553 static void Generate_TransitionElementsSmiToDouble(MacroAssembler* masm) {
1547 KeyedStoreIC::GenerateTransitionElementsSmiToDouble(masm); 1554 KeyedStoreIC::GenerateTransitionElementsSmiToDouble(masm);
1548 } 1555 }
1549 1556
1557
1550 static void Generate_TransitionElementsDoubleToObject(MacroAssembler* masm) { 1558 static void Generate_TransitionElementsDoubleToObject(MacroAssembler* masm) {
1551 KeyedStoreIC::GenerateTransitionElementsDoubleToObject(masm); 1559 KeyedStoreIC::GenerateTransitionElementsDoubleToObject(masm);
1552 } 1560 }
1553 1561
1554 #ifdef ENABLE_DEBUGGER_SUPPORT 1562 #ifdef ENABLE_DEBUGGER_SUPPORT
1555 static void Generate_LoadIC_DebugBreak(MacroAssembler* masm) { 1563 static void Generate_LoadIC_DebugBreak(MacroAssembler* masm) {
1556 Debug::GenerateLoadICDebugBreak(masm); 1564 Debug::GenerateLoadICDebugBreak(masm);
1557 } 1565 }
1558 1566
1559 1567
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
1709 ++functions; 1717 ++functions;
1710 1718
1711 BUILTIN_LIST_C(DEF_FUNCTION_PTR_C) 1719 BUILTIN_LIST_C(DEF_FUNCTION_PTR_C)
1712 BUILTIN_LIST_A(DEF_FUNCTION_PTR_A) 1720 BUILTIN_LIST_A(DEF_FUNCTION_PTR_A)
1713 BUILTIN_LIST_DEBUG_A(DEF_FUNCTION_PTR_A) 1721 BUILTIN_LIST_DEBUG_A(DEF_FUNCTION_PTR_A)
1714 1722
1715 #undef DEF_FUNCTION_PTR_C 1723 #undef DEF_FUNCTION_PTR_C
1716 #undef DEF_FUNCTION_PTR_A 1724 #undef DEF_FUNCTION_PTR_A
1717 } 1725 }
1718 1726
1727
1719 void Builtins::SetUp(bool create_heap_objects) { 1728 void Builtins::SetUp(bool create_heap_objects) {
1720 ASSERT(!initialized_); 1729 ASSERT(!initialized_);
1721 Isolate* isolate = Isolate::Current(); 1730 Isolate* isolate = Isolate::Current();
1722 Heap* heap = isolate->heap(); 1731 Heap* heap = isolate->heap();
1723 1732
1724 // Create a scope for the handles in the builtins. 1733 // Create a scope for the handles in the builtins.
1725 HandleScope scope(isolate); 1734 HandleScope scope(isolate);
1726 1735
1727 const BuiltinDesc* functions = builtin_function_table.functions(); 1736 const BuiltinDesc* functions = builtin_function_table.functions();
1728 1737
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
1825 return Handle<Code>(code_address); \ 1834 return Handle<Code>(code_address); \
1826 } 1835 }
1827 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) 1836 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C)
1828 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) 1837 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A)
1829 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 1838 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
1830 #undef DEFINE_BUILTIN_ACCESSOR_C 1839 #undef DEFINE_BUILTIN_ACCESSOR_C
1831 #undef DEFINE_BUILTIN_ACCESSOR_A 1840 #undef DEFINE_BUILTIN_ACCESSOR_A
1832 1841
1833 1842
1834 } } // namespace v8::internal 1843 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/compilation-cache.cc » ('j') | tools/presubmit.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698